home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
BARNET
/
FREENET
/
MCEVOY
/
MAPREADE
/
!MapReader
/
!Help
next >
Wrap
Text File
|
1995-11-07
|
4KB
|
89 lines
!MapReader v0.4
ArcWeb ImageMap Decoder for local files
=======================================
Disclaimer!
===========
I wrote this because I needed to, and I am making it available in case
anyone else finds it useful. I would rather not be responsible for any
damage it does to my files or machine, and I certainly won't be held
responsible for anyone else's.
Furthermore, this is distributed free - it's too 'orribly written for
anyone to justify making any money at all. Not that you'd try.
Please include this file in any copies - its not very long.
Hints on getting !MapReader to work
===================================
This is not an instruction manual, and the program is not (yet?) well
commented, but it must be fairly straight forward or I couldn't have written
it!
MapReader expects to be passed two System variables - ImageMap$X and
ImageMap$Y, containing the X and Y coordinates from ArcWeb. I have included
a note of the changes to make to the !FilerURLs.!RunImage (distributed
with ArcWeb 0.35 and © Acorn) at the bottom of this document, so that it
generates these from a Filer_Run: URL method.
MapReader works by using an index image to decode the coordinates.
The index is a 256 colour sprite called 'image' and saved as !MapReader.Image
This is a copy of the source of the map, coloured to define the areas that
are to act as anchors. The index image MUST be scaled to the same size as
the pixel dimensions of the rendered map - load it into ArcWeb as an ISMAP
image and point to the bottom right-hand corner to find the dimensions.
However, I advise against scaling the image before colouring it, as so much
definition can be lost as to make it rather difficult to see what one is
doing.
Next, colour 'sensitive' areas of the index image, noting the number
of the colour as displayed by the !Paint large colours chooser. Each colour
may be linked to a separate URL, and if anyone needs more than 254 links per
document, they are in a different league from me!
Now, scale the sprite down so that it is within a pixel-or-two of the
correct dimensions, and flip it upside-down. It's not my fault that sprites'
origins are bottom-left and ImageMaps' are top-left :-( Finally save the image.
Now generate a text index file. This is picky on format because it's
late and I'm lazy! Each line must begin with two or three numbers
(ie. 00, 04, 123) followed by a space, followed by a fully-qualified URL,
followed by a return code. The file should finish with a return code. This
should be saved as !MapReader.Index
Now point the anchor of your ISMAP image to :-
filer_run://ADFS::HardDisc/$/foo/bar/!MapReader
or whatever, and enjoy!
Compliments (??), comments (helpful!) and hints to :
cwrm100@cus.cam.ac.uk
Charles McEvoy
Cambridge, Sat 23rd September 1995
PS. It may be necessary to make adjustments to the WimpSlot, but the sprite
area looks after itself now.
Ammendments to make to Acorn's !FilerURLs.!RunImage
===================================================
*Insert* the following from line 230. Don't go deleting things!
230REM
240REM split off the ImageMap info if it is there
250REM
260i%=INSTR(url$,"?")
270IFi%<>0 mapcoord$=MID$(url$,i%+1):url$=LEFT$(url$,i%-1) ELSE mapcoord$=""
280IF mapcoord$<>"" THEN
281i%=INSTR(mapcoord$,",") : IF i%=0 ERROR 0, "Bad Coordinates"
282IF i%<>0 Xcoord$=LEFT$(mapcoord$,i%-1) : Ycoord$ = MID$(mapcoord$,i%+1)
290OSCLI "SETEVAL ImageMap$X " + Xcoord$
291OSCLI "SETEVAL ImageMap$Y " + Ycoord$
292ENDIF
That's all folks.
C.
Many thanks to Stuart Brodie for ArcWeb, and to Dom Symes for Zap.